
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html><head><title>Python: module telemetry.story.story</title>
<meta charset="utf-8">
</head><body bgcolor="#f0f0f8">

<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="heading">
<tr bgcolor="#7799ee">
<td valign=bottom>&nbsp;<br>
<font color="#ffffff" face="helvetica, arial">&nbsp;<br><big><big><strong><a href="telemetry.html"><font color="#ffffff">telemetry</font></a>.<a href="telemetry.story.html"><font color="#ffffff">story</font></a>.story</strong></big></big></font></td
><td align=right valign=bottom
><font color="#ffffff" face="helvetica, arial"><a href=".">index</a><br><a href="../telemetry/story/story.py">telemetry/story/story.py</a></font></td></tr></table>
    <p><tt>#&nbsp;Copyright&nbsp;2015&nbsp;The&nbsp;Chromium&nbsp;Authors.&nbsp;All&nbsp;rights&nbsp;reserved.<br>
#&nbsp;Use&nbsp;of&nbsp;this&nbsp;source&nbsp;code&nbsp;is&nbsp;governed&nbsp;by&nbsp;a&nbsp;BSD-style&nbsp;license&nbsp;that&nbsp;can&nbsp;be<br>
#&nbsp;found&nbsp;in&nbsp;the&nbsp;LICENSE&nbsp;file.</tt></p>
<p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#aa55cc">
<td colspan=3 valign=bottom>&nbsp;<br>
<font color="#ffffff" face="helvetica, arial"><big><strong>Modules</strong></big></font></td></tr>
    
<tr><td bgcolor="#aa55cc"><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</tt></td><td>&nbsp;</td>
<td width="100%"><table width="100%" summary="list"><tr><td width="25%" valign=top><a href="re.html">re</a><br>
</td><td width="25%" valign=top><a href="telemetry.story.shared_state.html">telemetry.story.shared_state</a><br>
</td><td width="25%" valign=top></td><td width="25%" valign=top></td></tr></table></td></tr></table><p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#ee77aa">
<td colspan=3 valign=bottom>&nbsp;<br>
<font color="#ffffff" face="helvetica, arial"><big><strong>Classes</strong></big></font></td></tr>
    
<tr><td bgcolor="#ee77aa"><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</tt></td><td>&nbsp;</td>
<td width="100%"><dl>
<dt><font face="helvetica, arial"><a href="__builtin__.html#object">__builtin__.object</a>
</font></dt><dd>
<dl>
<dt><font face="helvetica, arial"><a href="telemetry.story.story.html#Story">Story</a>
</font></dt></dl>
</dd>
</dl>
 <p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#ffc8d8">
<td colspan=3 valign=bottom>&nbsp;<br>
<font color="#000000" face="helvetica, arial"><a name="Story">class <strong>Story</strong></a>(<a href="__builtin__.html#object">__builtin__.object</a>)</font></td></tr>
    
<tr bgcolor="#ffc8d8"><td rowspan=2><tt>&nbsp;&nbsp;&nbsp;</tt></td>
<td colspan=2><tt>A&nbsp;class&nbsp;styled&nbsp;on&nbsp;unittest.TestCase&nbsp;for&nbsp;creating&nbsp;story&nbsp;tests.<br>
&nbsp;<br>
Tests&nbsp;should&nbsp;override&nbsp;Run&nbsp;to&nbsp;maybe&nbsp;start&nbsp;the&nbsp;application&nbsp;and&nbsp;perform&nbsp;actions<br>
on&nbsp;it.&nbsp;To&nbsp;share&nbsp;state&nbsp;between&nbsp;different&nbsp;tests,&nbsp;one&nbsp;can&nbsp;define&nbsp;a<br>
shared_state&nbsp;which&nbsp;contains&nbsp;hooks&nbsp;that&nbsp;will&nbsp;be&nbsp;called&nbsp;before&nbsp;and<br>
after&nbsp;mutiple&nbsp;stories&nbsp;run&nbsp;and&nbsp;in&nbsp;between&nbsp;runs.<br>
&nbsp;<br>
Args:<br>
&nbsp;&nbsp;shared_state_class:&nbsp;subclass&nbsp;of&nbsp;telemetry.story.shared_state.SharedState.<br>
&nbsp;&nbsp;name:&nbsp;string&nbsp;name&nbsp;of&nbsp;this&nbsp;story&nbsp;that&nbsp;can&nbsp;be&nbsp;used&nbsp;for&nbsp;identifying&nbsp;this&nbsp;story<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;in&nbsp;results&nbsp;output.<br>
&nbsp;&nbsp;labels:&nbsp;A&nbsp;list&nbsp;or&nbsp;set&nbsp;of&nbsp;string&nbsp;labels&nbsp;that&nbsp;are&nbsp;used&nbsp;for&nbsp;filtering.&nbsp;See<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;story.story_filter&nbsp;for&nbsp;more&nbsp;information.<br>
&nbsp;&nbsp;is_local:&nbsp;If&nbsp;True,&nbsp;the&nbsp;story&nbsp;does&nbsp;not&nbsp;require&nbsp;network.<br>&nbsp;</tt></td></tr>
<tr><td>&nbsp;</td>
<td width="100%">Methods defined here:<br>
<dl><dt><a name="Story-AsDict"><strong>AsDict</strong></a>(self)</dt><dd><tt>Converts&nbsp;a&nbsp;story&nbsp;<a href="__builtin__.html#object">object</a>&nbsp;to&nbsp;a&nbsp;dict&nbsp;suitable&nbsp;for&nbsp;JSON&nbsp;output.</tt></dd></dl>

<dl><dt><a name="Story-Run"><strong>Run</strong></a>(self, shared_state)</dt><dd><tt>Execute&nbsp;the&nbsp;interactions&nbsp;with&nbsp;the&nbsp;applications&nbsp;and/or&nbsp;platforms.</tt></dd></dl>

<dl><dt><a name="Story-__init__"><strong>__init__</strong></a>(self, shared_state_class, name<font color="#909090">=''</font>, labels<font color="#909090">=None</font>, is_local<font color="#909090">=False</font>, make_javascript_deterministic<font color="#909090">=True</font>)</dt><dd><tt>Args:<br>
&nbsp;&nbsp;make_javascript_deterministic:&nbsp;Whether&nbsp;JavaScript&nbsp;performed&nbsp;on<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;the&nbsp;page&nbsp;is&nbsp;made&nbsp;deterministic&nbsp;across&nbsp;multiple&nbsp;runs.&nbsp;This<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;requires&nbsp;that&nbsp;the&nbsp;web&nbsp;content&nbsp;is&nbsp;served&nbsp;via&nbsp;Web&nbsp;Page&nbsp;Replay<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;to&nbsp;take&nbsp;effect.&nbsp;This&nbsp;setting&nbsp;does&nbsp;not&nbsp;affect&nbsp;stories&nbsp;containing&nbsp;no&nbsp;web<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;content&nbsp;or&nbsp;where&nbsp;the&nbsp;HTTP&nbsp;MIME&nbsp;type&nbsp;is&nbsp;not&nbsp;text/html.See&nbsp;also:<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;_InjectScripts&nbsp;method&nbsp;in&nbsp;third_party/webpagereplay/httpclient.py.</tt></dd></dl>

<hr>
Data descriptors defined here:<br>
<dl><dt><strong>__dict__</strong></dt>
<dd><tt>dictionary&nbsp;for&nbsp;instance&nbsp;variables&nbsp;(if&nbsp;defined)</tt></dd>
</dl>
<dl><dt><strong>__weakref__</strong></dt>
<dd><tt>list&nbsp;of&nbsp;weak&nbsp;references&nbsp;to&nbsp;the&nbsp;object&nbsp;(if&nbsp;defined)</tt></dd>
</dl>
<dl><dt><strong>display_name</strong></dt>
</dl>
<dl><dt><strong>file_safe_name</strong></dt>
<dd><tt>A&nbsp;version&nbsp;of&nbsp;display_name&nbsp;that's&nbsp;safe&nbsp;to&nbsp;use&nbsp;as&nbsp;a&nbsp;filename.<br>
&nbsp;<br>
The&nbsp;default&nbsp;implementation&nbsp;sanitizes&nbsp;special&nbsp;characters&nbsp;with&nbsp;underscores,<br>
but&nbsp;it's&nbsp;okay&nbsp;to&nbsp;override&nbsp;it&nbsp;with&nbsp;a&nbsp;more&nbsp;specific&nbsp;implementation&nbsp;in<br>
subclasses.</tt></dd>
</dl>
<dl><dt><strong>id</strong></dt>
</dl>
<dl><dt><strong>is_local</strong></dt>
<dd><tt>Returns&nbsp;True&nbsp;iff&nbsp;this&nbsp;story&nbsp;does&nbsp;not&nbsp;require&nbsp;network.</tt></dd>
</dl>
<dl><dt><strong>labels</strong></dt>
</dl>
<dl><dt><strong>make_javascript_deterministic</strong></dt>
</dl>
<dl><dt><strong>name</strong></dt>
</dl>
<dl><dt><strong>serving_dir</strong></dt>
<dd><tt>Returns&nbsp;the&nbsp;absolute&nbsp;path&nbsp;to&nbsp;a&nbsp;directory&nbsp;with&nbsp;hash&nbsp;files&nbsp;to&nbsp;data&nbsp;that<br>
should&nbsp;be&nbsp;updated&nbsp;from&nbsp;cloud&nbsp;storage,&nbsp;or&nbsp;None&nbsp;if&nbsp;no&nbsp;files&nbsp;need&nbsp;to&nbsp;be<br>
updated.</tt></dd>
</dl>
<dl><dt><strong>shared_state_class</strong></dt>
</dl>
</td></tr></table></td></tr></table>
</body></html>